package com.atcumt.meituan;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Q7 {
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long[] nums = new long[n];
        Map<Long, Integer> odd = new HashMap<>();
        Map<Long, Integer> even = new HashMap<>();
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
            if (i % 2== 1) {
                if (odd.containsKey(nums[i])) {
                    odd.put(nums[i], odd.get(nums[i]) + 1);
                } else {
                    odd.put(nums[i], 1);
                }
            } else {
                if (even.containsKey(nums[i])) {
                    even.put(nums[i], even.get(nums[i]) + 1);
                } else {
                    even.put(nums[i], 1);
                }
            }
        }
        long oddF = 0,oddIndex=-1,evenF=0, evenIndex=-1;
        for (Map.Entry<Long, Integer> entry : odd.entrySet()) {
            if (oddF < entry.getValue()) {
                oddF = entry.getValue();
                oddIndex = entry.getKey();
            }
        }

        for (Map.Entry<Long, Integer> entry : even.entrySet()) {
            if (evenF < entry.getValue()) {
                evenF = entry.getValue();
                evenIndex = entry.getKey();
            }
        }
        System.out.println(minOps2(nums, oddIndex, evenIndex));
    }

    private static long minOps2(long[] nums, long num1, long num2) {
        long res = 0;
        for (int i = 0; i < nums.length; i++) {
            if (i % 2== 0 && nums[i] != num2) {
                res++;
            }
            if (i % 2== 1 && nums[i] != num1) {
                res++;
            }
        }
        return res;
    }
}
